// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 产品知识业务类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2023-02-17
 */
public enum ButlerProductTypeEnum {
    ALL(0, "全部"),
    ELECTROTHERMAL(1, "电热产品"),
    GAS(2, "燃气产品"),
    NET_SOFTNESS(3, "净软产品"),
    KITCHEN(4, "厨电产品"),
    OTHER(5, "其他产品");

    private int value;

    private String name;

    ButlerProductTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        ButlerProductTypeEnum arrObj[] = ButlerProductTypeEnum.values();
        for (ButlerProductTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
